package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.BywEmployeeImportInfoMapper;
import com.ruoyi.system.domain.BywEmployeeImportInfo;
import com.ruoyi.system.service.IBywEmployeeImportInfoService;

/**
 * 用户导入Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-05-24
 */
@Service
public class BywEmployeeImportInfoServiceImpl implements IBywEmployeeImportInfoService 
{
    @Autowired
    private BywEmployeeImportInfoMapper bywEmployeeImportInfoMapper;

    /**
     * 查询用户导入
     * 
     * @param id 用户导入主键
     * @return 用户导入
     */
    @Override
    public BywEmployeeImportInfo selectBywEmployeeImportInfoById(Long id)
    {
        return bywEmployeeImportInfoMapper.selectBywEmployeeImportInfoById(id);
    }

    @Override
    public BywEmployeeImportInfo selectLastEmployeeImportInfoById(Long eId)
    {
        return bywEmployeeImportInfoMapper.selectLastEmployeeImportInfoById(eId);
    }

    /**
     * 查询用户导入列表
     * 
     * @param bywEmployeeImportInfo 用户导入
     * @return 用户导入
     */
    @Override
    public List<BywEmployeeImportInfo> selectBywEmployeeImportInfoList(BywEmployeeImportInfo bywEmployeeImportInfo)
    {
        return bywEmployeeImportInfoMapper.selectBywEmployeeImportInfoList(bywEmployeeImportInfo);
    }

    /**
     * 新增用户导入
     * 
     * @param bywEmployeeImportInfo 用户导入
     * @return 结果
     */
    @Override
    public int insertBywEmployeeImportInfo(BywEmployeeImportInfo bywEmployeeImportInfo)
    {
        bywEmployeeImportInfo.setCreateTime(DateUtils.getNowDate());
        return bywEmployeeImportInfoMapper.insertBywEmployeeImportInfo(bywEmployeeImportInfo);
    }

    /**
     * 修改用户导入
     * 
     * @param bywEmployeeImportInfo 用户导入
     * @return 结果
     */
    @Override
    public int updateBywEmployeeImportInfo(BywEmployeeImportInfo bywEmployeeImportInfo)
    {
        bywEmployeeImportInfo.setUpdateTime(DateUtils.getNowDate());
        return bywEmployeeImportInfoMapper.updateBywEmployeeImportInfo(bywEmployeeImportInfo);
    }

    /**
     * 批量删除用户导入
     * 
     * @param ids 需要删除的用户导入主键
     * @return 结果
     */
    @Override
    public int deleteBywEmployeeImportInfoByIds(Long[] ids)
    {
        return bywEmployeeImportInfoMapper.deleteBywEmployeeImportInfoByIds(ids);
    }

    /**
     * 删除用户导入信息
     * 
     * @param id 用户导入主键
     * @return 结果
     */
    @Override
    public int deleteBywEmployeeImportInfoById(Long id)
    {
        return bywEmployeeImportInfoMapper.deleteBywEmployeeImportInfoById(id);
    }
}
